package com.crm.service.impl;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.crm.dao.ServiceInfoMapper;
import com.crm.model.ServiceInfo;
import com.crm.service.ServiceInfoService;
import com.crm.util.UUIDUtil;

/**
 * 高亚林
 * 2016年12月20日下午3:44:01
 */
@Service
public class ServiceInfoServiceImpl extends BaseServiceImpl<ServiceInfo> implements ServiceInfoService{
	
	@Autowired
	private ServiceInfoMapper infoMapper;

	@Override
	@Transactional
	public int insert(ServiceInfo record) {
		
		String uuid = UUIDUtil.getUUID();
		record.setInfoId(uuid);
		return super.insert(record);
	}

	@Override
	public void prohibit(String infoId) {
		// TODO Auto-generated method stub
		infoMapper.prohibit(infoId);
	}

	@Override
	public void awaken(String infoId) {
		// TODO Auto-generated method stub
		infoMapper.awaken(infoId);
	}
}
